package com.itheima.day06.zhengzebiaodashi;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入用户名：");
        String name = sc.next();
        if(name.matches("[A-Z][a-zA-Z0-9_$]{7}")){
            System.out.println("用户名合法");
        }else{
            System.out.println("用户名不合法");
        }
        }
    }
